program test (input, output);
var q,x,y,z: integer;
var a,b: real;
var c: integer;
begin 
	c := 2+2*2*(5-4*(5*5+(3-1)+(-2)));
	write(c);
end.